package com.kwt.learn.classloader;

/**
 * 静态变量以及静态代码块是在类加载过程中初始化完成的。对象s1修改了静态变量V的值，对象s2的变量V也会随着变化
 * 所以证明静态变量是类的信息，和对象无关
 */
public class ClassLoader {
    public static void main(String[] args) {
        StaticClassDomain s1 = new StaticClassDomain();
        StaticClassDomain s2 = new StaticClassDomain();
        System.out.println(s1.getV());
        System.out.println(s2.getV());

        s1.setV(13);
        System.out.println(s1.getV());
        System.out.println(s2.getV());

    }
}
